package com.sunshine.lnuplusweb.dao;

import com.sunshine.lnuplusweb.entities.UserConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 用户配置D
 */
@Mapper
public interface UserConfigMapper {
    void insertDefault(@Param("userId") String userId);

    void insert(
            @Param("userId") String userId,
            @Param("nowScheduleId") int nowScheduleId,
            @Param("weekCount") int weekCount,
            @Param("height") int height,
            @Param("textSize") int textSize,
            @Param("textColor") String textColor,
            @Param("round") int round,
            @Param("showTeacher") boolean showTeacher,
            @Param("alpha") float alpha,
            @Param("dateColor") String dateColor,
            @Param("textLeft") boolean textLeft
    );

    int selectScheduleIdByUserId(@Param("userId") String userId);

    UserConfig selectByUserId(@Param("userId") String userId);

    void updateScheduleId(@Param("userId") String userId, @Param("scheduleId") int scheduleId);

    void updateUserConfig(
            @Param("userId") String userId,
            @Param("weekCount") int weekCount,
            @Param("height") int height,
            @Param("textSize") int textSize,
            @Param("textColor") String textColor,
            @Param("round") int round,
            @Param("showTeacher") boolean showTeacher,
            @Param("alpha") float alpha,
            @Param("dateColor") String dateColor,
            @Param("textLeft") boolean textLeft
    );
}
